package com.wgchao.customer.common.service;

import com.wgchao.customer.common.feign.AuthFeign;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName: TestService
 * @author: wgchao
 * @createTime: 2019/8/9 4:12 PM
 * @Description: TODO
 */
@Service
public class TestService {
    @Autowired
    private AuthFeign authFeign;

    @GlobalTransactional(name = "demo")
    public boolean test() {
        authFeign.hello();
        System.out.println("----------------");
 //       int i = 10/0;
        return true;
    }
}
